<template>
  <view class="my-settle-container">
    <view class="settle-left">
      <view class="checked-all">
        <radio :checked="isFullcheck" color="#c00000" @click="radioChangeAll"></radio>
        <text>全选</text>
      </view>
      <view class="settle-count-all">
        合计：
        <view class="count-all">￥{{totalAmount}}</view>
      </view>
    </view>
    <view class="settle-right">
      结算({{totalCount}})
    </view>
    
  </view>
</template>

<script>
  export default {
    name:"my_settle",
    data() {
      return {
        
      };
      
    },
    props:{
      totalAmount:{
        type:Number,
        default:0
      },
      checkedAll:{
        type:Boolean,
        default:false
      },
      totalCount:{
        type:Number,
        default:0
      }
    },
    methods:{
      radioChangeAll(){
        this.$emit('changeAllState',{
          state:this.isFullcheck
        })
      }
    },
    computed:{
      isFullcheck(){
        return this.checkedAll
      }
    }
  }
</script>

<style lang="scss">
.my-settle-container{
  background-color: #fff;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  // background-color: skyblue;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  margin-left: 5px;
  .settle-left{
    display: flex;
    justify-content: space-between;
    width: 67%;
    .checked-all{
      width: 50%;
    }
    .settle-count-all{
      width: 50%;
      display: flex;
      .count-all{
        color: #c00000;
      }
    }
  }
  .settle-right{
    width: 33%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background-color: #c00000;
    color: #fff;
  }
}
</style>